package edu.ubb.remeye.server.settings;

/**
 * Server runtime settings class.
 * 
 * @author Andrew Ianicicau
 *
 */
public class ServerRuntimeSettings {

	///////////////////////////////////////////////////////////////////////////////////
	////		ATTRIBUTES - ServerRuntimeSettings
	///////////////////////////////////////////////////////////////////////////////////

	/**
	 * Instance of class for singleton design pattern.
	 */
	private static ServerRuntimeSettings settings;
	
	/**
	 * The password the server entered.
	 */
	private String serverPassword;
	
	/**
	 * The identificator of client in control of server.
	 */
	private long controlClient;

	
	
	///////////////////////////////////////////////////////////////////////////////////
	////		CONSTRUCTORS - ServerRuntimeSettings
	///////////////////////////////////////////////////////////////////////////////////

	private ServerRuntimeSettings() {
		
	}

	
	
	///////////////////////////////////////////////////////////////////////////////////
	////		METHODS - ServerRuntimeSettings
	///////////////////////////////////////////////////////////////////////////////////
	
	/**
	 * Singleton design pattern instance provider method.
	 */
	public static ServerRuntimeSettings getinstance() {
		if(settings == null)
			settings = new ServerRuntimeSettings();
		return settings;
	}
	
	public String getServerPassword() {
		return settings.serverPassword;
	}
	
	public void setServerPassword(String password) {
		settings.serverPassword = password;
	}
	
	public long getControlClient() {
		return settings.controlClient;
	}
	
	public void setControlClient(long id) {
		settings.controlClient = id;
	}

}
